package com.easy.query.test.h2.vo.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.h2.vo.QueryVO;
import com.easy.query.core.proxy.columns.SQLStringColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author xuejiaming
 */
public class QueryVOProxy extends AbstractProxyEntity < QueryVOProxy, QueryVO > {

    private static final Class < QueryVO > entityClass = QueryVO .class;

    public static QueryVOProxy createTable () {
        return new QueryVOProxy ();
    }

    public QueryVOProxy () {
    }

    /**
     * {@link QueryVO#getId}
     */
    public SQLStringColumn < QueryVOProxy, java.lang.String> id(){
    return getStringColumn("id", java.lang.String.class);
}

    /**
     * {@link QueryVO#getField1}
     */
    public SQLStringColumn < QueryVOProxy, java.lang.String> field1(){
    return getStringColumn("field1", java.lang.String.class);
}

    /**
     * {@link QueryVO#getField2}
     */
    public SQLStringColumn < QueryVOProxy, java.lang.String> field2(){
    return getStringColumn("field2", java.lang.String.class);
}


    @Override
    public Class < QueryVO > getEntityClass () {
        return entityClass;
    }


    /**
     * 数据库列的简单获取
     * @return
     */
    public QueryVOProxyFetcher FETCHER = new QueryVOProxyFetcher (this, null, SQLSelectAsExpression.empty);


    public static class QueryVOProxyFetcher extends AbstractFetcher<QueryVOProxy, QueryVO, QueryVOProxyFetcher> {

        public QueryVOProxyFetcher (QueryVOProxy proxy, QueryVOProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
        super(proxy, prev, sqlSelectAsExpression);
    }


        /**
         * {@link QueryVO#getId}
         */
        public QueryVOProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * {@link QueryVO#getField1}
         */
        public QueryVOProxyFetcher field1() {
            return add(getProxy().field1());
        }

        /**
         * {@link QueryVO#getField2}
         */
        public QueryVOProxyFetcher field2() {
            return add(getProxy().field2());
        }


        @Override
        protected QueryVOProxyFetcher createFetcher(
            QueryVOProxy cp,
            AbstractFetcher<QueryVOProxy, QueryVO, QueryVOProxyFetcher> prev,
            SQLSelectAsExpression sqlSelectExpression
        ) {
            return new QueryVOProxyFetcher (cp, this, sqlSelectExpression);
        }
    }

}
